package net.maku.answer.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 会员信息
 *
 * @TableName member
 */
@TableName(value = "member")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class Member implements Serializable {
    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户名
     */
    @TableField(value = "username")
    private String username;

    /**
     * 密码
     */
    @TableField(value = "password")
    private String password;

    /**
     * 生日
     */
    @TableField(value = "birthday")
    private LocalDate birthday;

    /**
     * 性别
     */
    @TableField(value = "gender")
    private Integer gender;

    /**
     * 年龄
     */
    @TableField(value = "age")
    private Integer age;

    /**
     * 星座
     */
    @TableField(value = "constellation")
    private Long constellation;

    /**
     * 状态 1正常 0禁用
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 创建者
     */
    @TableField(value = "creator")
    private Long creator;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 更新者
     */
    @TableField(value = "updater")
    private Long updater;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    /**
     * 版本号
     */
    @TableField(value = "version")
    private Integer version;

    /**
     * 删除标识  0：正常   1：已删除
     */
    @TableField(value = "deleted")
    @TableLogic
    private Integer deleted;

    /**
     * 租户ID
     */
    @TableField(value = "tenant_id")
    private Long tenantId;

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

}